package swing;

import java.awt.Point;
import java.awt.Polygon;

public class TestCollisioni
{


	public static void main(String[] args)
	{
		int[] x={0,2,4};
		int[] y={0,4,0};
		java.awt.Point p = new Point(2, 2);
		int n = 3;
		Polygon poly = new Polygon(x, y, n);
		if (poly.contains(p)){
			System.out.println("dentro");
		}else{
			System.out.println("fuori");
		}
	}

}